<template>
    <div class="one">
        <my-header></my-header>
        <!-- 页面内容 -->
        <div class="content1">
            <!-- 书籍内容 -->
            <div class="bookInfo">
                <div class="bookLe">
                    <s>言情小说</s>
                    <a href="">
                    <img :src="`/${books.lg_img}`" alt="">
                    </a>
                </div>
                <div class="bookR">
                    <div class="bookInfo01">
                        <div class="bookName">
                            <h2>
                                <a>{{books.title}}</a>
                            </h2>
                            <span>7.8</span>
                        </div>
                        <p>
                            <span>作者：{{books.author}}</span>
                            <span>字数：{{books.wordNumber}}</span>
                            <span>粉丝数：{{books.fans}}</span>
                            <span>点赞数：{{books.likes}}</span>
                            <span class="manyMan">35人评分</span>
                        </p>
                    </div>
                    <div class="bookInfo02">
                        <div class="left">
                            <p>
                                <i class="price">价格：5阅饼/千字</i>
                            </p>
                            <span  class="tryRead" @click="tz">免费试读</span>
                            <span class="buyBook">购买</span>
                        </div>
                        <div class="right">
                            <span class="look_phone">
                                <img src="../assets/look_phone.jpg" alt="">
                            </span>
                            <span class="look_ewm">
                                <img src="../assets/index.png" alt="" style="height: 83px; width: 83px; margin: -4px;">
                            </span>
                        </div>
                    </div>
                    <div class="bookInfo03">
                        <p class="line-clamp">{{books.brief}}</p>
                    </div>
                </div>
            </div>
            <!-- 书籍内容结束 -->
            <!-- 书圈内容开始 -->
            <div class="sqCon">
                <div class="bookCir">
                    <div class="title">
                        <p>
                            <span>书圈</span>
                            <span class="line">|</span>
                            <span>共6125人,260条</span>
                        </p>
                        <a href="javascript:;" class="comBtn">
                            <s></s>
                            <span>我来说两句</span>
                        </a>
                    </div>
                    <div class="allCom" style="display:block;">
                        <ul>
                            <li v-for="(p, i) of comment" :key="i">
                                <span class="headImg">
                                    <img :src="`/${p.avatar}`" alt="">
                                </span>
                                <div class="allCom">
                                    <div class="ComMan">
                                        <p>{{p.uname}}</p>
                                        <span class="lv">LV5</span>
                                        <span>{{p.utime}}</span>
                                    </div>
                                    <div class="ComStar">
                                        <img src="../assets/yStar.png" alt="" v-for="(p, i) of 4" :key="i">
                                        <img src="../assets/gStar.png" alt="">
                                    </div>
                                    <div class="comTxt">
                                        <span>
                                            <p>书评</p>
                                            
                                            <a href="" target="_blank" class="pingjia">{{p.conmment}}</a>
                                            
                                        </span>
                                    </div>
                                    <div class="attend">
                                        <a href="" class="zan">
                                            <img src="../assets/zan.gif" alt="">
                                            <i>7</i>
                                        </a>
                                        <span class="line"></span>
                                        <a href="" class="huifu">
                                            <img src="../assets/hf.gif" alt="">
                                            <i>&nbsp;</i>
                                        </a>
                                        <span class="up" style="display:none">
                                            <i>收起</i>
                                            <s></s>
                                        </span>
                                    </div>
                                </div>
                            </li>
                        </ul>
                        <div class="load">
                            <p class="loadMore">
                                <a href="">查看更多</a>
                            </p>
                        </div>
                    </div>
                </div>
                <!-- 右侧内容开始 -->
                <div class="conR">
                    <div class="seen">
                        <div class="seeTit">
                            <span>看过的人还看</span>
                        </div>
                        <div class="seeWrap">
                            <ul>
                                <li>
                                    <a href="">
                                        <img src="/img/md_img/薄相.jpg" alt="">
                                    </a>
                                    <p class="bookName">
                                        <a href="">薄相</a>
                                    </p>
                                    <p class="author">余妻</p>
                                    <span>
                                        <s></s>
                                       526
                                    </span>
                                    <a href="">
                                        <img src="/img/md_img/沉香雪.jpg" alt="">
                                    </a>
                                    <p class="bookName">
                                        <a href="">沉香雪</a>
                                    </p>
                                    <p class="author">是斤</p>
                                    <span>
                                        <s></s>
                                        774
                                    </span>
                                </li>
                                <li>
                                    <a href="">
                                        <img src="/img/md_img/江南恨.jpg" alt="">
                                    </a>
                                    <p class="bookName">
                                        <a href="">江南恨</a>
                                    </p>
                                    <p class="author">张嘉佳</p>
                                    <span>
                                        <s></s>
                                       526
                                    </span>
                                    <a href="">
                                        <img src="/img/md_img/琉璃愿.jpg" alt="">
                                    </a>
                                    <p class="bookName">
                                        <a href="">琉璃愿</a>
                                    </p>
                                    <p class="author">当年明月</p>
                                    <span>
                                        <s></s>
                                        774
                                    </span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <my-footer></my-footer>
        <my-top></my-top>
    </div>
</template>

<script>
import MyHeader from "../components/MyHeader.vue";
import MyFooter from "../components/MyFooter.vue";
import MyTop from "../components/MyTop.vue";
export default {
  props:["bid"],
  components: { MyHeader, MyFooter, MyTop },
  data(){
      return{
          books:{},
          comment:[],
    };
  },
  methods: {
    tz(){
        this.$router.push({path:'/read',query:{bid: this.bid,cid:0}})
    }  
  },
  mounted(){
      this.axios.get('/details/'+this.bid).then((result)=>{
      console.log(result.data);
    this.books = result.data[0]
    });
    this.axios.get('/details/pl/'+this.bid).then((result)=>{
      console.log(result.data);
    this.comment = result.data
    });
  }
}




</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
.one{
    width: 100%;
    height: 100%;
    color: #9e9e9e;
    font: 12px/20px "Microsoft Yahei", arial,sans-serif;
    background: #f0f0f0;
    font-weight: normal;
}
.content1 {
  width: 1000px;
  margin: 42px auto 0;
  position: relative;
}
.bookInfo {
  width: 1000px;
  overflow: hidden;
  background-color: #fff;
}
.bookLe {
  float: left;
  width: 26.9%;
}
.bookLe s {
  width: 86px;
  height: 23px;
  line-height: 18px;
  position: absolute;
  background-position: 0 0;
  margin: 11px 0 0 -5px;
  color: #fff;
  padding-left: 28px;
  text-decoration: none;
}
s {
    background:url(../assets/sjIcon.png) no-repeat;
}
.bookLe a {
  margin: 68px auto 0;
  width: 156px;
  height: 208px;
  display: block;
  position: relative;
  z-index: 1;
}
.bookLe a img {
  width: 100%;
  height: 100%;
}
.bookR {
  float: left;
  width: 73.1%;
  overflow: hidden;
  margin-bottom: 27px;
  border-left: 1px solid #f0f0f0;
  box-sizing: border-box;
}
.bookR .bookInfo01 {
  padding: 22px 40px 0 30px;
  height: 95px;
  border-bottom: 1px solid #f0f0f0;
}
.bookR .bookInfo01 .bookName {
  overflow: hidden;
  margin-bottom: 15px;
  color: #212121;
}
h2 {
  max-width: 438px;
  height: 23px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  float: left;
  font-style: normal;
  font-weight: normal;
}
h2 a {
  color: #212121;
  font-size: 20px;
}

.bookName span {
  float: right;
  font-size: 20px;
}
.bookInfo01 p {
  overflow: hidden;
}
.bookInfo01 p span {
  margin-right: 12px;
}
.manyMan {
  float: right;
}
.bookInfo02 {
  padding: 24px 40px 0 30px;
  height: 123px;
  border-bottom: 1px solid #f0f0f0;
}
.bookInfo02 .left {
  float: left;
  width: 180px;
  margin-top: 4px;
}
.left p {
    margin-bottom: 18px;
    width: 300px;
}
.left p .price {
    color: #212121;
}
.left p i {
    margin-right: 10px;
}
.left span {
    line-height: 30px;
    text-align: center;
    color: #fff;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-block;
}
.left .tryRead {
    width: 80px;
    height: 30px;
    background: #8bc34a;
}
.left .buyBook {
    width: 70px;
    height: 30px;
    background: #f26552;
    margin-left: 6px;
}
.bookInfo02 .right {
    float: right;
    width: 164px;
}
.right .look_phone {
    float: left;
}
.right .look_ewm {
    float: right;
    width: 75px;
    height: 75px;
    overflow: hidden;
}
.bookInfo03 {
    padding: 24px 40px 0 30px;
}
.bookInfo03 p {
    line-height: 18px;
    height: 54px;
    overflow: hidden;
    margin-bottom: 13px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
}
/* 书圈内容 */
.sqCon {
    background: #fafafa;
    width: 1000px;
    overflow: hidden;
    margin-top: 30px;
}
.bookCir {
    float: left;
    width: 69.5%;
    border-right: 1px solid #f0f0f0;
    background: #fff;
    box-sizing: border-box;
}
.bookCir .title {
    width: 100%;
    height: 92px;
    border-bottom: 1px solid #f0f0f0;
    padding: 34px 40px 0 40px;
    box-sizing: border-box;
}
.bookCir .title p {
    float: left;
    width: 210px;
    padding: 5px 0 0 0;
}
.bookCir .title .shuquan {
    font-size: 16px;
    color: #212121;
}
.bookCir .title .line {
    font-size: 16px;
    color: #f0f0f0;
    margin: 0 8px;
}
em, span {
    display: inline-block;
}
.bookCir .title .comBtn {
    width: 98px;
    height: 25px;
    line-height: 25px;
    background: #8bc34a;
    border-radius: 3px;
    float: right;
    color: #fff;
    /* padding-left: 26px; */
}
.bookCir .title .comBtn s {
    float: left;
    width: 12px;
    height: 12px;
    background-position: -86px -25px;
    margin: 6px 6px 0 9px;
}
.bookCir .title .comBtn s {
    float: left;
    width: 12px;
    height: 12px;
    background-position: -86px -25px;
    margin: 6px 6px 0 9px;
}
.bookCir .allCom {
    overflow: hidden;
    display: block;
}
.bookCir ul {
    padding-left: 40px;
    min-height: 1044px;
}
.bookCir ul li {
    padding-top: 32px;
    overflow: hidden;
}
.bookCir ul li .headImg {
    width: 50px;
    height: 50px;
}
.bookCir ul li .headImg img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.bookCir ul li .allCom {
    float: right;
    width: 544px;
    border-bottom: 1px solid #f0f0f0;
    padding: 4px 40px 0 0;
}
.bookCir ul li .ComMan {
    overflow: hidden;
    margin: 0 0 11px 0;
}
.bookCir ul li .ComMan p {
    max-width: 330px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #6b6b6b;
    float: left;
    line-height: 18px;
    margin-right: 20px;
}
.ComMan .vip {
    width: 36px;
    height: 16px;
    background: #d2d2d2;
    color: #fff;
    line-height: 16px;
    text-align: center;
    margin: 0 6px 0 0;
    float: left;
}
.ComMan span {
    float: right;
}
.bookCir ul li .ComStar {
    height: 27px;
    background: #fafafa;
    margin: 0 0 8px 0;
    padding: 9px 0 0 12px;
}
.bookCir ul li .ComStar img {
    margin-right: 2px;
}
.bookCir ul li .comTxt {
    padding-top: 7px;
    margin-bottom: 13px;
    overflow: hidden;
}
.comTxt p {
    display: inline-block;
    width: 30px;
    height: 18px;
    background-position: 0 -68px !important ;
    margin: 0 7px 0 0;
    text-decoration: none;
    color: #fff;
    line-height: 18px;
    padding-left: 4px;
}
.comTxt p {background:url(../assets/sjIcon.png)
}
.comTxt  a{
    color: #6b6b6b;
    font-size: 14px;
    /* word-break: break-all; */
}

.bookCir ul li .attend {
    margin-bottom: 12px;
    overflow: hidden;
}
.zan img {
    width: 12px;
    height: 12px;
    margin: 0 4px 0 0;
    float: left;
}
ul li .attend i {
    line-height: 12px;
    float: left;
    margin-right: 4px;
}
.bookCir ul li .attend .line {
    margin: 0 12px 0 8px;
    width: 1px;
    height: 12px;
    background: #f0f0f0;
    float: left;
}
.attend .huifu img {
    width: 13px;
    height: 12px;
    margin: 1px 4px 0 0;
    float: left;
}
.attend i {
    line-height: 12px;
    float: left;
    margin-right: 4px;
}
.load {
    width: 615px;
    height: 48px;
    background: #fafafa;
    font-size: 14px;
    color: #9e9e9e;
    line-height: 48px;
    margin: 36px auto;
}
.loadMore {
    text-align: center;
}
.conR {
    float: right;
    width: 30.5%;
}
.seen {
    padding: 43px 40px 0;
    /* border-bottom: 1px solid #f0f0f0; */
}
.seeTit {
    overflow: hidden;
    margin-bottom: 32px;
}
.seeTit span{
    font-size: 16px;
    color: #212121;
    float: left;
}
.seeWrap {
    width: 225px;
    overflow: hidden;
}
.seeWrap ul {
    width: 2000px;
    overflow: hidden;
    margin-right: 15px;
}
 .seeWrap ul li {
    width: 105px;
    overflow: hidden;
    float: left;
    margin-right: 15px;
}
.seeWrap ul li img {
    width: 105px;
    height: 140px;
    margin-bottom: 10px;
}
.seeWrap ul li .bookName {
    color: #212121;
}
.seeWrap ul li p {
    max-width: 105px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.seeWrap ul li span {
    margin-bottom: 20px;
}
 .seeWrap ul li span s {
    float: left;
    width: 13px;
    height: 8px;
    background: url(../assets/icon1.png) no-repeat -86px -73px;
    margin: 6px 6px 0 0;
}
.bookName {
    color: #212121;
}
.bookName a {
    color: #212121;
    font-size: 14px;
}

</style>